1. Field of the Invention
The present invention relates to an optical grating for use in an encoder or a spectroscope and also relates to an encoder used for position measurement or for use in a machine tool or a semiconductor production apparatus.
2. Description of the Prior Art
In conventional optical encoders, a second diffraction grating (hereinafter also referred to simply as a "second grating") is disposed at the back of a first diffraction grating (hereinafter referred to simply as a "first grating") in such a manner that the second diffraction grating can move in a direction parallel to the longer sides of the first diffraction grating. Furthermore, a photoelectric conversion element is disposed at the back of the second grating. The first grating and the second grating have an optical grating (hereinafter referred to as a "grating part") including light transmitting portions (hereinafter referred to as "transparent portions") and portions opaque to light (hereinafter referred to as "opaque portions") which are alternatively disposed at predetermined intervals (hereinafter such an interval will be referred to as the "grating pitch") as shown in FIG. 1.
In the above structure, when the first grating is illuminated by a parallel light ray L, the photoelectric conversion element is illuminated by the light which has passed through both the first and second gratings. The photoelectric conversion element generates an electric signal corresponding to the intensity of the incident light, and outputs the resultant electric signal. The electric signal varies in accordance with the change in the amount of light passing through the first and second gratings, wherein the amount of light passing through the first and second gratings varies depending on the relative displacement between the first and second gratings. The displacement signal is ideally in the form of a triangular-waveform signal proportional to the apparent transparent portion seen from the light source side, wherein the apparent transparent portion varies depending on the degree of overlap between the first and second gratings. In practice, however, the displacement signal contains various distortion components caused by the diffraction of light or the like. Therefore, in a practical position detecting operation, the above signal is regarded as a pseudo sinusoidal signal.
In the conventional optical encoder using the conventional grating part shown in FIG. 1, the detected value representing the position obtained from the displacement signal includes a great division error. Furthermore, in the conventional optical encoder described above, the degree of distortion of the displacement signal greatly varies depending on the change in the spacing between the first and second gratings. Therefore, to maintain the error within an allowable small range, it is required to maintain the distance between the first grating and the second grating at a proper fixed value. This means that extremely high precision is required in attachment of the first grating and the second grating.
To avoid the above problem, the inventors of the present invention have proposed an optical encoder having a grating pattern in which, to prevent nth-order distortion components, pattern elements are arranged such that the spacings between adjacent pattern elements are not constant but vary in phase by predetermined amounts (Japanese Patent Laid-Open No. 3-48122 (1991)). Japanese Patent Laid-Open No. 3-48122 cited above discloses a pattern which can remove 3rd- and 5th-order harmonic distortion components, which cause error. It also discloses that 7th- and higher-order harmonic distortion components can also be removed by a similar construction.
Although it is not disclosed in the Japanese Patent Laid-Open No. 3-48122 cited above, it is also possible to remove 2nd- and other even-order distortion components in the same manner as that disclosed therein. However, the even-order distortion components are very small. Besides, in common optical encoders, the even-order distortion components are removed when a difference between the signal and its opposite-phase signal is taken to generate a final output signal. If it is attempted to remove the 2nd- order distortion component, as great as a 30% reduction occurs in gain. Therefore, such an attempt is meaningless. However, in recent applications, it is required to remove higher-order harmonic distortion components, such as 3rd-, 5th-, 7th-, 9th, 11th-, 13th-order harmonic distortion components, as well as low-order distortion components.
As described above, it is possible to remove the even-order harmonic distortion components by taking the difference between a signal and its opposite-phase signal. However, it is more desirable to remove the even-order harmonic distortion components by an easy technique rather than using the pattern arrangement disclosed in the Japanese Patent Laid-Open No. 3-48122 cited above. As for the grating part, it is known in the art to change the transmittance continuously in such a manner as to form a sinusoidal grating which includes no distortion components. This makes it possible to obtain a displacement signal having no distortion. However, in practice, the sinusoidal grating is difficult to produce, and thus it is not used in practical applications.